package cz.muni.fi.pa165.soap.func;

import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author shifty
 */
public class Funcs {

    public static Object[] concatArrays(Object[] first, Object[] second) {
        List<Object> both = new ArrayList<>(first.length + second.length);
        Collections.addAll(both, first);
        Collections.addAll(both, second);
        return both.toArray(new String[both.size()]);
    }

    public static void setFixedSize(Component cmp, Dimension dim) {
        cmp.setSize(dim);
        cmp.setPreferredSize(dim);
        cmp.setMaximumSize(dim);
        cmp.setMinimumSize(dim);
    }
}
